//package mutsumimod.patches;
//
//import basemod.ReflectionHacks;
//import com.evacipated.cardcrawl.modthespire.lib.SpirePatch;
//import com.evacipated.cardcrawl.modthespire.lib.SpirePostfixPatch;
//import com.megacrit.cardcrawl.actions.AbstractGameAction;
//import com.megacrit.cardcrawl.actions.common.ApplyPowerAction;
//import com.megacrit.cardcrawl.actions.common.ReducePowerAction;
//import com.megacrit.cardcrawl.actions.common.RemoveSpecificPowerAction;
//import com.megacrit.cardcrawl.core.AbstractCreature;
//import com.megacrit.cardcrawl.dungeons.AbstractDungeon;
//import com.megacrit.cardcrawl.powers.AbstractPower;
//import mutsumimod.cards.custom.SakiDown;
//import mutsumimod.monitors.SakiDownMonitor;
//import mutsumimod.powers.BasePower;
//import mutsumimod.powers.BeautifulEraDebuffPower;
//import mutsumimod.powers.BeautifulEraPower;
//import mutsumimod.powers.StandPower;
//
////可以onRemove，那这个patch没有用
//public class ReduceStandPatch {
//
//
//    public static void onReduceStand(int amount){
//        if(amount<=0){
//            return;
//        }
//        SakiDownMonitor.addStandReduceAmount(amount);
//        for(AbstractPower power : AbstractDungeon.player.powers){
//            if(power instanceof BasePower){
//                ((BasePower) power).onLoseStand(amount);
//            }
//        }
//    }
//
//    @SpirePatch(
//            clz = RemoveSpecificPowerAction.class,
//            method = SpirePatch.CONSTRUCTOR,
//            paramtypez = {
//                    AbstractCreature.class, AbstractCreature.class, String.class
//            }
//    )
//    public static class RemoveCons1Patch {
//        @SpirePostfixPatch
//        public static void postfix(RemoveSpecificPowerAction __instance,AbstractCreature target, AbstractCreature source, String powerToRemove){
//            if(target.equals(AbstractDungeon.player)&&powerToRemove.equals(StandPower.POWER_ID)&&AbstractDungeon.player.hasPower(StandPower.POWER_ID)){
//                onReduceStand(AbstractDungeon.player.getPower(StandPower.POWER_ID).amount);
//            }
//        }
//    }
//
//    @SpirePatch(
//            clz = RemoveSpecificPowerAction.class,
//            method = SpirePatch.CONSTRUCTOR,
//            paramtypez = {
//                    AbstractCreature.class, AbstractCreature.class, AbstractPower.class
//            }
//    )
//    public static class RemoveCons2Patch {
//        @SpirePostfixPatch
//        public static void postfix(RemoveSpecificPowerAction __instance,AbstractCreature target, AbstractCreature source, AbstractPower powerInstance){
//            if(target.equals(AbstractDungeon.player)&&powerInstance instanceof StandPower){
//                onReduceStand(powerInstance.amount);
//            }
//        }
//    }
//
//    @SpirePatch(
//            clz = ReducePowerAction.class,
//            method = SpirePatch.CONSTRUCTOR,
//            paramtypez = {
//                    AbstractCreature.class, AbstractCreature.class, String.class, int.class
//            }
//    )
//    public static class ReduceCons1Patch {
//        @SpirePostfixPatch
//        public static void postfix(ReducePowerAction __instance, AbstractCreature target, AbstractCreature source, String power, int amount){
//            if(target.equals(AbstractDungeon.player)&&power.equals(StandPower.POWER_ID)&&AbstractDungeon.player.hasPower(StandPower.POWER_ID)){
//                onReduceStand(Math.min(AbstractDungeon.player.getPower(StandPower.POWER_ID).amount,amount));
//            }
//        }
//    }
//
//    @SpirePatch(
//            clz = ReducePowerAction.class,
//            method = SpirePatch.CONSTRUCTOR,
//            paramtypez = {
//                    AbstractCreature.class, AbstractCreature.class, AbstractPower.class, int.class
//            }
//    )
//    public static class ReduceCons2Patch {
//        @SpirePostfixPatch
//        public static void postfix(ReducePowerAction __instance, AbstractCreature target, AbstractCreature source, AbstractPower powerInstance, int amount){
//            if(target.equals(AbstractDungeon.player)&&powerInstance instanceof StandPower){
//                onReduceStand(Math.min(powerInstance.amount,amount));
//            }
//        }
//    }
//}
